public class ReverseNum {
    public static void main(String[] args) {
        int num = 123;
        int gewei = 123 % 10;
        num = num / 10;
        int shiwei = num % 10;
        num = num /10;
        int baiwei = num % 10;
        int num2 = gewei*100 + shiwei*10 + baiwei;
        System.out.print(num2);
    }
}
